package com.hzvictory.hotel_system.service.Impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hzvictory.hotel_system.mapper.DishorderitemMapper;
import com.hzvictory.hotel_system.pojo.entity.Dishorderitem;
import com.hzvictory.hotel_system.service.IDishorderitemService;

/**
 * 菜品订单详情Service业务层处理
 *
 * @author hzvictory
 * @date 2025-07-25
 */
@Service
public class DishorderitemServiceImpl implements IDishorderitemService
{
    @Autowired
    private DishorderitemMapper dishorderitemMapper;

    /**
     * 查询菜品订单详情
     *
     * @param id 菜品订单详情主键
     * @return 菜品订单详情
     */
    @Override
    public Dishorderitem selectDishorderitemById(Long id)
    {
        return dishorderitemMapper.selectDishorderitemById(id);
    }

    /**
     * 查询菜品订单详情列表
     *
     * @param dishorderitem 菜品订单详情
     * @return 菜品订单详情
     */
    @Override
    public List<Dishorderitem> selectDishorderitemList(Dishorderitem dishorderitem)
    {
        return dishorderitemMapper.selectDishorderitemList(dishorderitem);
    }

    /**
     * 新增菜品订单详情
     *
     * @param dishorderitem 菜品订单详情
     * @return 结果
     */
    @Override
    public int insertDishorderitem(Dishorderitem dishorderitem)
    {
        return dishorderitemMapper.insertDishorderitem(dishorderitem);
    }

    /**
     * 修改菜品订单详情
     *
     * @param dishorderitem 菜品订单详情
     * @return 结果
     */
    @Override
    public int updateDishorderitem(Dishorderitem dishorderitem)
    {
        return dishorderitemMapper.updateDishorderitem(dishorderitem);
    }

    /**
     * 批量删除菜品订单详情
     *
     * @param ids 需要删除的菜品订单详情主键
     * @return 结果
     */
    @Override
    public int deleteDishorderitemByIds(Long[] ids)
    {
        return dishorderitemMapper.deleteDishorderitemByIds(ids);
    }

    /**
     * 删除菜品订单详情信息
     *
     * @param id 菜品订单详情主键
     * @return 结果
     */
    @Override
    public int deleteDishorderitemById(Long id)
    {
        return dishorderitemMapper.deleteDishorderitemById(id);
    }
}
